package com.tank.util;

import org.hibernate.stat.Statistics;

public class StatsUtil {
	
	public static Statistics stats=null;
	
	public static void start(){
		
		if(stats == null) stats=HibernateUtil.getSessionFactory().getStatistics();
		stats.setStatisticsEnabled(true);
		
	}
	
	
	public static void end(){
		
		System.out.println(stats.getFlushCount());
		System.out.println(stats.getEntityUpdateCount());
	}
	
	
}
